<html xmlns:py="http://genshi.edgewall.org/"
	xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">
<py:def function="topmenu">
	<ul id="mainmenu">
		<li class="first"><a href="${tg.url('/')}"
			class="${('not_active', 'active')[defined('page') and page==page=='index']}">Home</a></li>
		<li><a href="${tg.url('/sites')}"
			class="${('not_active', 'active')[defined('page') and page==page=='sites']}">Sites</a></li>
		<li py:if="g.p.has_permission('logbook')" ><a href="${tg.url('/logbook')}"
			class="${('not_active', 'active')[defined('page') and page==page=='logbook']}">Log Book</a></li>
		<li><a href="${tg.url('/about')}"
			class="${('not_active', 'active')[defined('page') and page==page=='about']}">About</a></li>
		
		<span py:if="tg.auth_stack_enabled" py:strip="True">
		
		<li py:if="not request.identity" class="loginlogout"><a
			href="${tg.url('/login')}">Login/Register</a></li>
		<li py:if="request.identity" class="loginlogout"><a
			href="${tg.url('/logout_handler')}">Logout</a></li>
		<li py:if="g.p.has_permission('manage')" class="loginlogout"><a
			href="${tg.url('/admin')}">Admin</a></li>
		<li py:if="g.p.has_permission('profile')"  class="loginlogout"><a
			href="${tg.url('/profile')}">Profile</a></li>
		<li py:if="g.p.has_permission('new_profile')"  class="loginlogout"><a
			href="${tg.url('/profile/new')}">New Profile</a></li>
		
		</span>
	</ul>
</py:def>
</html>